<template>
  <div>
    <div class="daka-box">
      <div class="daka-title">大咖新动态</div>
      <ul>
        <li v-for="v in arr" :key="v.uid" @click="goDakaDEtail(v.uid)">
          <img class="artists" :src="v.headUrl" />
          <p>{{v.celebrityName}}</p>
          <p>{{v.recommendTag}}
            <sup>
              <span></span>
            </sup>
          </p>
        </li>
      </ul>
    </div>
  </div>
</template>
<script>
import getLink from '@/api/getLink.js'
export default {
  data() {
    return {
      arr: []
    }
  },
  created() {
    getLink('/apidl/show/artists').then(res => {
      this.arr = res.data
    })
  },
  methods: {
    goDakaDEtail(dakanum) {
      // alert(dakanum)
      this.$router.push({
        path: '/dakaDetail',
        query: {
          // 要发送的数据，products位置可以随便写
          id: dakanum
        }
      })
    }
  }
}
</script>
<style scoped>
.daka-box {
  width: 90%;
  height: 2 6rem;
  margin: auto;
}
.daka-title {
  font-size: 0.44rem;
  font-weight: bold;
}
ul {
  width: 100%;
  margin: auto;
  /* background-color: coral; */
  overflow-x: scroll;
  display: flex;
}
li {
  /* float: left; */
  width: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  margin-right: 0.2rem;
}
li .artists {
  width: 1rem;
  height: 1rem;
  margin: auto;
  border-radius: 50%;
  background-color: brown;
}

li p:nth-child(2) {
  font-size: 0.26rem;
}
li p:nth-child(3) {
  display: block;
  position: relative;
  color: gray;
  font-size: 0.22rem;
}

li sup span {
  display: block;
  width: 0.1rem;
  height: 0.1rem;
  background-color: red;
  position: absolute;
  top: 0;
  right: 0;
}
::-webkit-scrollbar {
  /*隐藏滚轮*/
  display: none;
}
</style>